linalg_lq Module



Interfaces

public interface form_lq

  • private pure subroutine form_lq_no_pivot(l, tau, q)

    Forms the orthogonal matrix from the elementary reflectors returned by the LQ factorization algorithm.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:,:) :: l

    On input, an M-by-N matrix where the elements above the diagonal contain the elementary reflectors generated from the LQ factorization performed by lq_factor. On and below the diagonal the matrix contains the matrix . On output, the elements above the diagonal are zeroed sucht hat the remaining matrix is the M-by-N lower trapezoidal matrix where only the M-by-M submatrix is the lower triangular matrix . Notice, M must be less than or equal to N for this routine.

    real(kind=real64), intent(in), dimension(:) :: tau

    A MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in .

    real(kind=real64), intent(out), dimension(:,:) :: q

    An N-by-N matrix where the orthogonal matrix will be written.

  • private pure subroutine form_lq_no_pivot_cmplx(l, tau, q)

    Forms the orthogonal matrix from the elementary reflectors returned by the LQ factorization algorithm.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(inout), dimension(:,:) :: l

    On input, an M-by-N matrix where the elements above the diagonal contain the elementary reflectors generated from the LQ factorization performed by lq_factor. On and below the diagonal the matrix contains the matrix . On output, the elements above the diagonal are zeroed sucht hat the remaining matrix is the M-by-N lower trapezoidal matrix where only the M-by-M submatrix is the lower triangular matrix . Notice, M must be less than or equal to N for this routine.

    complex(kind=real64), intent(in), dimension(:) :: tau

    A MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in .

    complex(kind=real64), intent(out), dimension(:,:) :: q

    An N-by-N matrix where the orthogonal matrix will be written.

public interface lq_factor

  • private pure subroutine lq_factor_no_pivot(a, tau, lq, l, q)

    Computes the LQ factorization of an M-by-N matrix where is a lower triangular (or lower trapezoidal) matrix and is a orthogonal matrix.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:) :: a

    The M-by-N matrix to factor.

    real(kind=real64), intent(out), optional, allocatable, target, dimension(:) :: tau

    A MIN(M, N)-element array used to store the scalar factors of the elementary reflectors.

    real(kind=real64), intent(out), optional, allocatable, target, dimension(:,:) :: lq

    An M-by-N matrix with the elements below the diagonal containing the MIN(M,N)-by-N lower trapezoidal matrix ( is lower triangluar if M >= N). The elements above the diagonal, along with the array tau, represent the orthogonal matrix as a product of elementary reflectors.

    real(kind=real64), intent(out), optional, allocatable, target, dimension(:,:) :: l

    The M-by-N lower trapezoidal matrix .

    real(kind=real64), intent(out), optional, allocatable, target, dimension(:,:) :: q

    The N-by-N orthogonal matrix .

  • private pure subroutine lq_factor_no_pivot_cmplx(a, tau, lq, l, q)

    Computes the LQ factorization of an M-by-N matrix where is a lower triangular (or lower trapezoidal) matrix and is a orthogonal matrix.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in), dimension(:,:) :: a

    The M-by-N matrix to factor.

    complex(kind=real64), intent(out), optional, allocatable, target, dimension(:) :: tau

    A MIN(M, N)-element array used to store the scalar factors of the elementary reflectors.

    complex(kind=real64), intent(out), optional, allocatable, target, dimension(:,:) :: lq

    An M-by-N matrix with the elements below the diagonal containing the MIN(M,N)-by-N lower trapezoidal matrix ( is lower triangluar if M >= N). The elements above the diagonal, along with the array tau, represent the orthogonal matrix as a product of elementary reflectors.

    complex(kind=real64), intent(out), optional, allocatable, target, dimension(:,:) :: l

    The M-by-N lower trapezoidal matrix .

    complex(kind=real64), intent(out), optional, allocatable, target, dimension(:,:) :: q

    The N-by-N orthogonal matrix .

public interface mult_lq

  • private pure function mult_lq_mtx(lside, trans, a, tau, c) result(qc)

    Multiplies a matrix by the orthogonal matrix from an LQ factorization.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: lside

    Set to true to compute ; else, set to false to compute .

    logical, intent(in) :: trans

    Set to true to compute ; else, set to false to compute .

    real(kind=real64), intent(in), dimension(:,:) :: a

    On input, an K-by-P matrix containing the elementary reflectors output from the LQ factorization. If lside is set to true, P = M; else, if lside is set to false, P = N.

    real(kind=real64), intent(in), dimension(:) :: tau

    A K-element array containing the scalar factors of each elementary reflector defined in a.

    real(kind=real64), intent(in), dimension(:,:) :: c

    The M-by-N matrix .

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The M-by-N product of the orthogonal and the .

  • private pure function mult_lq_mtx_cmplx(lside, trans, a, tau, c) result(qc)

    Multiplies a matrix by the orthogonal matrix from an LQ factorization.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: lside

    Set to true to compute ; else, set to false to compute .

    logical, intent(in) :: trans

    Set to true to compute ; else, set to false to compute .

    complex(kind=real64), intent(in), dimension(:,:) :: a

    On input, an K-by-P matrix containing the elementary reflectors output from the LQ factorization. If lside is set to true, P = M; else, if lside is set to false, P = N.

    complex(kind=real64), intent(in), dimension(:) :: tau

    A K-element array containing the scalar factors of each elementary reflector defined in a.

    complex(kind=real64), intent(in), dimension(:,:) :: c

    The M-by-N matrix .

    Return Value complex(kind=real64), allocatable, dimension(:,:)

    The M-by-N product of the orthogonal and the .

  • private pure function mult_lq_vec(trans, a, tau, c) result(qc)

    Multiplies a vector with the orthogonal matrix from an LQ factorization such that .

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: trans

    Set to true to compute ; else, set to false to compute .

    real(kind=real64), intent(in), dimension(:,:) :: a

    On input, an K-by-M matrix containing the elementary reflectors output from the LQ factorization. Notice, the contents of this matrix are restored on exit.

    real(kind=real64), intent(in), dimension(:) :: tau

    A K-element array containing the scalar factors of each elementary reflector defined in a.

    real(kind=real64), intent(in), dimension(:) :: c

    On input, the M-element vector .

    Return Value real(kind=real64), allocatable, dimension(:)

    The M-element product of the orthogonal matrix and the vector .

  • private pure function mult_lq_vec_cmplx(trans, a, tau, c) result(qc)

    Multiplies a vector with the orthogonal matrix from an LQ factorization such that .

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: trans

    Set to true to compute ; else, set to false to compute .

    complex(kind=real64), intent(in), dimension(:,:) :: a

    On input, an K-by-M matrix containing the elementary reflectors output from the LQ factorization. Notice, the contents of this matrix are restored on exit.

    complex(kind=real64), intent(in), dimension(:) :: tau

    A K-element array containing the scalar factors of each elementary reflector defined in a.

    complex(kind=real64), intent(in), dimension(:) :: c

    The M-element vector .

    Return Value complex(kind=real64), allocatable, dimension(:)

    The M-element product of the orthogonal matrix and the vector .

public interface solve_lq

  • private pure function solve_lq_mtx(a, tau, b) result(x)

    Solves a system of LQ factored equations of the form .

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:) :: a

    The M-by-N LQ factored matrix as returned by lq_factor. Notice, N must be greater than or equal to M.

    real(kind=real64), intent(in), dimension(:) :: tau

    A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by lq_factor.

    real(kind=real64), intent(in), dimension(:,:) :: b

    The M-by-NRHS matrix .

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The N-by-NRHS matrix .

  • private pure function solve_lq_mtx_cmplx(a, tau, b) result(x)

    Solves a system of LQ factored equations of the form .

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in), dimension(:,:) :: a

    The M-by-N LQ factored matrix as returned by lq_factor. Notice, N must be greater than or equal to M.

    complex(kind=real64), intent(in), dimension(:) :: tau

    A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by lq_factor.

    complex(kind=real64), intent(in), dimension(:,:) :: b

    The M-by-NRHS matrix .

    Return Value complex(kind=real64), allocatable, dimension(:,:)

    The N-by-NRHS matrix .

  • private pure function solve_lq_vec(a, tau, b) result(x)

    Solves a system of LQ factored equations of the form .

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:) :: a

    The M-by-N LQ factored matrix as returned by lq_factor. Notice, N must be greater than or equal to M.

    real(kind=real64), intent(in), dimension(:) :: tau

    A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by lq_factor.

    real(kind=real64), intent(in), dimension(:) :: b

    The M-element vector .

    Return Value real(kind=real64), allocatable, dimension(:)

    The N-element vector .

  • private pure function solve_lq_vec_cmplx(a, tau, b) result(x)

    Solves a system of LQ factored equations of the form .

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in), dimension(:,:) :: a

    The M-by-N LQ factored matrix as returned by lq_factor. Notice, N must be greater than or equal to M.

    complex(kind=real64), intent(in), dimension(:) :: tau

    A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by lq_factor.

    complex(kind=real64), intent(in), dimension(:) :: b

    The M-element vector .

    Return Value complex(kind=real64), allocatable, dimension(:)

    The N-element vector .